/* Class42 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.util.Calendar;

public class Class42 implements MouseListener, MouseMotionListener,
		FocusListener {
	public static boolean aBoolean785 = false;
	public static Calendar aCalendar786 = Calendar.getInstance();
	public static int anInt787 = 0;
	public static Stream aClass39_Sub6_788;
	public static JString aClass3_789;
	public static JString aClass3_790 = Class39_Sub5_Sub9.createJString(124, "sich mit einer anderen Welt zu verbinden)3");
	public static volatile int recordedMouseX;
	public static JString aClass3_792;
	public static int anInt793;
	public static JString aClass3_794;
	public static JString aClass3_795;
	public static JString[] aClass3Array796;

	public static int method901(int i, int i_0_, int i_1_, boolean bool) {
		i &= 0x3;
		if (i == 0)
			return i_0_;
		if (i == 1)
			return i_1_;
		if (i == 2)
			return 7 - i_0_;
		return 7 - i_1_;
	}

	public void focusGained(FocusEvent focusevent) {
		/* empty */
	}

	public synchronized void mouseExited(MouseEvent mouseevent) {
		if (Class39_Sub13.aClass42_1502 != null) {
			CacheArchive.anInt1302 = 0;
			Class39_Sub5_Sub4_Sub1.anInt2208 = -1;
			Class10.anInt172 = -1;
		}
	}

	public synchronized void mouseReleased(MouseEvent mouseevent) {
		if (Class39_Sub13.aClass42_1502 != null) {
			CacheArchive.anInt1302 = 0;
			Class39_Sub5_Sub2.anInt1699 = 0;
		}
		if (mouseevent.isPopupTrigger())
			mouseevent.consume();
	}

	public static void pushMessage(JString class3, JString class3_2_, boolean bool, int i) {
		if (i == 0 && ISAAC.anInt1095 != -1) {
			Class39_Sub5_Sub3.aClass3_1714 = class3_2_;
			Class46.mouseButtonType = 0;
		}
		if (Tile.anInt1912 == -1)
			Class14.aBoolean245 = true;
		for (int i_3_ = 99; i_3_ > 0; i_3_--) {
			client.anIntArray1268[i_3_] = client.anIntArray1268[i_3_ - 1];
			Class39_Sub11.aClass3Array1462[i_3_] = Class39_Sub11.aClass3Array1462[i_3_ - 1];
			Class2.aClass3Array52[i_3_] = Class2.aClass3Array52[i_3_ - 1];
		}
		client.anIntArray1268[0] = i;
		Class39_Sub11.aClass3Array1462[0] = class3;
		Class2.aClass3Array52[0] = class3_2_;
	}

	public synchronized void mousePressed(MouseEvent mouseevent) {
		if (Class39_Sub13.aClass42_1502 != null) {
			CacheArchive.anInt1302 = 0;
			recordedMouseX = mouseevent.getX();
			Class41.recordedMouseY = mouseevent.getY();
			Class2.aLong55 = Class2.method51(100);
			if (mouseevent.isMetaDown()) {
				Class23.recordedMouseButtonType = 2;
				Class39_Sub5_Sub2.anInt1699 = 2;
			} else {
				Class23.recordedMouseButtonType = 1;
				Class39_Sub5_Sub2.anInt1699 = 1;
			}
		}
		if (mouseevent.isPopupTrigger())
			mouseevent.consume();
	}

	public synchronized void mouseDragged(MouseEvent mouseevent) {
		if (Class39_Sub13.aClass42_1502 != null) {
			CacheArchive.anInt1302 = 0;
			Class39_Sub5_Sub4_Sub1.anInt2208 = mouseevent.getX();
			Class10.anInt172 = mouseevent.getY();
		}
	}

	public synchronized void mouseMoved(MouseEvent mouseevent) {
		if (Class39_Sub13.aClass42_1502 != null) {
			CacheArchive.anInt1302 = 0;
			Class39_Sub5_Sub4_Sub1.anInt2208 = mouseevent.getX();
			Class10.anInt172 = mouseevent.getY();
		}
	}

	public synchronized void focusLost(FocusEvent focusevent) {
		if (Class39_Sub13.aClass42_1502 != null)
			Class39_Sub5_Sub2.anInt1699 = 0;
	}

	public synchronized void mouseEntered(MouseEvent mouseevent) {
		if (Class39_Sub13.aClass42_1502 != null) {
			CacheArchive.anInt1302 = 0;
			Class39_Sub5_Sub4_Sub1.anInt2208 = mouseevent.getX();
			Class10.anInt172 = mouseevent.getY();
		}
	}

	public void mouseClicked(MouseEvent mouseevent) {
		if (mouseevent.isPopupTrigger())
			mouseevent.consume();
	}

	public static void method903(int i) {
		aClass3_795 = null;
		aClass3_794 = null;
		aClass3_789 = null;
		aClass3_792 = null;
		aClass39_Sub6_788 = null;
		aCalendar786 = null;
		aClass3Array796 = null;
		aClass3_790 = null;
	}

	static {
		aClass3_789 = Class39_Sub5_Sub9.createJString(108, "green:");
		aClass3_792 = Class39_Sub5_Sub9.createJString(108, ":chalreq:");
		recordedMouseX = 0;
		aClass3_794 = Class39_Sub5_Sub9.createJString(109, "@gr2@");
		aClass3_795 = aClass3_789;
	}
}
